package org.dreamfly.core.util;

import org.dreamfly.core.bean.SzPicture;

import java.util.Comparator;

/**
 * Created by IntelliJ IDEA.
 * User: Gin
 * Date: 11-1-7
 * Time: 下午4:59
 * To change this template use File | Settings | File Templates.
 */
public class PowerComparator implements Comparator{
    @Override
    public int compare(Object o1, Object o2) {
        SzPicture pictureFirst = (SzPicture) o1;
        SzPicture pictureSecond = (SzPicture) o2;
        if(pictureFirst.getPower() < pictureSecond.getPower()){
            return 1;
        }
        return 0;  //To change body of implemented methods use File | Settings | File Templates.
    }
}
